import request from '@/utils/request.js'

// 会员等级-会员等级列表
export const getUserLevel = page => {
  return request({
    url: `/user_level/${page}`
  })
}

// 会员等级-增加会员等级
export const createUserLevel = data => {
  return request({
    url: '/user_level',
    method: 'post',
    data
  })
}

// 会员等级-修改会员等级
export const updateUserLevel = (id, data) => {
  return request({
    url: `/user_level/${id}`,
    method: 'post',
    data
  })
}

// 会员等级-删除会员等级
export const deleteUserLevel = id => {
  return request({
    url: `/user_level/${id}/delete`,
    method: 'post'
  })
}

// 会员等级-修改会员等级状态
export const updateUserLevelStatus = (id, status) => {
  return request({
    url: `/user_level/${id}/update_status`,
    method: 'post',
    data: { status }
  })
}
